import 'package:flutter/material.dart';
import 'package:flutter_demo/view/counter_view.dart';
import 'package:flutter_demo/viewmodel/counter_viewmodel.dart';
import 'package:flutter_demo/viewmodel/timer_viewmodel.dart';
import 'package:provider/provider.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {

    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: MultiProvider(
        providers: [
          ChangeNotifierProvider(create: (_) => CounterViewModel()),
          ChangeNotifierProvider(create: (_) => TimerViewModel()),
        ],
        child: CounterView(),
      ),
    );
  }
}

